<?php
include_once 'Zend/Db/Table.php';
include_once 'Account.php';
Zend_Db_Table::setDefaultAdapter($db);

class Product extends Zend_Db_Table 
{
	protected $_name = 'affiliSt_products1';
	
	public function getNumOfProduct($username)
	{
		$account = new Account();
		$accId = $account->getId($username);
		$total = $this->_db->fetchOne("SELECT COUNT(*) FROM $this->_name WHERE accId = $accId");
		return $total;
	}
}
?>